1900 |
InsertControlItem / UserEditor / A2X:
axG2antt1.BeginUpdate(); axG2antt1.BackColor = Color.FromArgb(240,240,240); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.ConditionalFormats.Add("1 = 1",null).Bold = true; (axG2antt1.Columns.Add("Type") as EXG2ANTTLib.Column).Alignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("1. A ProgID such as \"MSCAL.Calendar.7\""); var_Items.set_ItemDivider(h,0); int hX = var_Items.InsertControlItem(0,"MSCAL.Calendar",""); // Add 'Microsoft Calendar Control 2007(MSCAL.OCX)' reference to your project. (var_Items.get_ItemObject(hX) as MSACAL.Calendar).BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255)); h = var_Items.AddItem("2. A CLSID such as \"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}\""); var_Items.set_ItemDivider(h,0); hX = var_Items.InsertControlItem(0,"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}",""); h = var_Items.AddItem("3. A URL such as \"http://www.exontrol.com\""); var_Items.set_ItemDivider(h,0); hX = var_Items.InsertControlItem(0,"http://www.exontrol.com",""); h = var_Items.AddItem("4. A reference to an Active document such as \"file://\\\\Documents\\MyDoc.doc\""); var_Items.set_ItemDivider(h,0); hX = var_Items.InsertControlItem(0,"file://C:\\empesting.xml",""); h = var_Items.AddItem("5.A fragment of HTML such as \"MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>\""); var_Items.set_ItemDivider(h,0); hX = var_Items.InsertControlItem(0,"MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>",""); var_Items.set_ItemHeight(hX,56); h = var_Items.AddItem("6.Anything, if it is preffixed by \"A2X:\""); var_Items.set_ItemDivider(h,0); hX = var_Items.InsertControlItem(0,"A2X:TOC24.Toc24Ctrl.1",""); axG2antt1.EndUpdate(); |
1899 |
How do I add a RichTextBox editor
// UserEditorOleEvent event - Occurs when an user editor fires an event. private void axG2antt1_UserEditorOleEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_UserEditorOleEventEvent e) { System.Diagnostics.Debug.Print( e.ev.ToString() ); } //this.axG2antt1.UserEditorOleEvent += new AxEXG2ANTTLib._IG2anttEvents_UserEditorOleEventEventHandler(this.axG2antt1_UserEditorOleEvent); axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.DefaultItemHeight = 32; EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("RICHTEXT") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.UserEditorType; var_Editor.UserEditor("RICHTEXT.RichtextCtrl",""); // Add 'Microsoft Rich Textbox Control 6.0 (SP4)(richtx32.ocx)' reference to your project. RichTextLib.RichTextBox var_RichTextBox = (var_Editor.UserEditorObject as RichTextLib.RichTextBox); var_RichTextBox.AutoVerbMenu = true; var_RichTextBox.TextRTF = "{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\\r\\nThis is some {\\b bold} text.\\par\\r\\n}"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("RICHTEXT.RichtextCtrl"); axG2antt1.EndUpdate(); |
1898 |
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
// DblClick event - Occurs when the user dblclk the left mouse button over an object. private void axG2antt1_DblClick(object sender, AxEXG2ANTTLib._IG2anttEvents_DblClickEvent e) { int h = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellValue(h,c).ToString() ); } //this.axG2antt1.DblClick += new AxEXG2ANTTLib._IG2anttEvents_DblClickEventHandler(this.axG2antt1_DblClick); axG2antt1.BeginUpdate(); axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.Columns.Add("C1"); axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("Item 1"),1,"Item 2"); var_Items.set_CellValue(var_Items.AddItem("Item 3"),1,"Item 4"); var_Items.set_CellValue(var_Items.AddItem("Item 5"),1,"Item 6"); axG2antt1.EndUpdate(); |
1897 |
How can I display dates in DD/MM/YYYY format
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = false; axG2antt1.Columns.Add("Date"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_ItemDivider(var_Items.AddItem("Different Date Formats"),0); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"day(value) + `/` + month(value) + `/` + year(value)"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"year(value) + ` - ` + day(value) + ` - ` + month(value)"); int h = var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemHeight(h,24); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); var_Items.set_FormatCell(h,0,"`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)"); var_Items.set_ItemDivider(var_Items.AddItem("Predefined Date Formats"),0); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"value"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"shortdateF(value)"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"shortdate(value)"); var_Items.set_FormatCell(var_Items.AddItem(Convert.ToDateTime("12/1/1971",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0,"longdate(value)"); axG2antt1.EndUpdate(); |
1896 |
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = false; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.ColumnsAllowSizing = true; (axG2antt1.Columns.Add("Column A (cont)") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,true); axG2antt1.Columns.Add("Column 1"); (axG2antt1.Columns.Add("Column B (cont)") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,true); axG2antt1.Columns.Add("Column 2"); axG2antt1.EndUpdate(); |
1895 |
How do I get the column from cursor, when it hovers the empty portion of the items section
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { int i = axG2antt1.get_ItemFromPoint(0,-1,c,hit); System.Diagnostics.Debug.Print( "Column" ); System.Diagnostics.Debug.Print( c.ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.Columns.Add("Column 0"); axG2antt1.Columns.Add("Column 1"); axG2antt1.Columns.Add("Column 2"); axG2antt1.EndUpdate(); |
1894 |
How do I add items once the user clicks the empty area
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. private void axG2antt1_ClickEvent(object sender, EventArgs e) { int i = axG2antt1.get_ItemFromPoint(0,-1,c,hit); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(i),1,c); } //this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Number of Items to Add"); axG2antt1.Columns.Add("Click on Column"); axG2antt1.EndUpdate(); |
1893 |
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row
|
1892 |
Is there any option to stop events
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { System.Diagnostics.Debug.Print( "AddItem event is fired only if FreezeEvents(False) is called" ); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // AddLink event - Occurs when the user links two bars using the mouse. private void axG2antt1_AddLink(object sender, AxEXG2ANTTLib._IG2anttEvents_AddLinkEvent e) { System.Diagnostics.Debug.Print( "AddLink event is fired only if FreezeEvents(False) is called" ); } //this.axG2antt1.AddLink += new AxEXG2ANTTLib._IG2anttEvents_AddLinkEventHandler(this.axG2antt1_AddLink); // BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { System.Diagnostics.Debug.Print( "BarResize event is fired only if FreezeEvents(False) is called" ); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.FreezeEvents(true); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); axG2antt1.FreezeEvents(false); |
1891 |
How do I specify a more intensive color if using RenderType property
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.RenderType = -16777216; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH" + "IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" + "STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" + "FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" + "XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC"); var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" + "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" + "aZACj4arKejrRDCMAggI="); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Color = 0x1000000; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars["Summary"]; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar1.Color = 0x2000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummaryJ = var_Items.AddItem("Summary A"); var_Items.AddBar(hSummaryJ,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J",null); int hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.1"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J1",null); hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.2"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J2",null); var_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>"); int hSummaryK = var_Items.AddItem("Summary B"); var_Items.AddBar(hSummaryK,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K",null); int hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.1"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.2"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>"); var_Items.set_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1890 |
How can I include the child items, when a filter is applied
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; axG2antt1.ContinueColumnScroll = false; axG2antt1.MarkSearchColumn = false; axG2antt1.SearchColumnIndex = 1; axG2antt1.Indent = 16; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.FilterBarPromptVisible = true; axG2antt1.FilterBarPromptPattern = "Nancy"; axG2antt1.FilterInclude = EXG2ANTTLib.FilterIncludeEnum.exItemsWithChilds; axG2antt1.Chart.LevelCount = 2; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Name") as EXG2ANTTLib.Column).Width = 96; (var_Columns.Add("Title") as EXG2ANTTLib.Column).Width = 96; var_Columns.Add("City"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h0 = var_Items.AddItem("Nancy Davolio"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.InsertItem(h0,null,"Andrew Fuller"); var_Items.set_CellValue(h0,1,"Vice President, Sales"); var_Items.set_CellValue(h0,2,"Tacoma"); h0 = var_Items.InsertItem(h0,null,"Michael Suyama"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Janet Leverling"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Kirkland"); h0 = var_Items.InsertItem(h0,null,"Margaret Peacock"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Redmond"); var_Items.set_ExpandItem(0,true); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1889 |
Is it possible to change the date format shown when you scroll the horizontal bar on the chart
|
1888 |
How do I change the drop down filter icon/button (white)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN" + "J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" + "NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" + "hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" + "bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" + "BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI="); var_Appearance.Add(1,"CP:2 -4 -4 2 4"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,0x1000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,axG2antt1.BackColor); axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.None2; axG2antt1.BackColorHeader = Color.FromArgb(255,255,255); axG2antt1.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels; axG2antt1.HeaderHeight = 24; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Filter") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.AllowSort = false; var_Column.AllowDragging = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,196); var_Chart.LevelCount = 2; axG2antt1.EndUpdate(); |
1887 |
How do I prevent changing the cell's state ( check-box state )
|
1886 |
How do I change the color of the columns's header to cover all levels
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColorHeader; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.DefaultItemHeight = 36; axG2antt1.TreeColumnIndex = -1; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Width = 24; var_Column.AllowSizing = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("C2") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2); var_Columns.Add("Column1"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.BackColorLevelHeader = axG2antt1.BackColorHeader; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("6/22/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 1.2"); var_Items.set_CellValue(h,2,"Cell 1.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/25/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 2.2"); var_Items.set_CellValue(h,2,"Cell 2.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/26/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/28/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1885 |
Is it possible to extend the columns's header to fill all levels
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.DefaultItemHeight = 36; axG2antt1.TreeColumnIndex = -1; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Width = 24; var_Column.AllowSizing = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("C2") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2); var_Columns.Add("Column1"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.BackColorLevelHeader = axG2antt1.BackColorHeader; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("6/22/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 1.2"); var_Items.set_CellValue(h,2,"Cell 1.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/25/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 2.2"); var_Items.set_CellValue(h,2,"Cell 2.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/26/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/28/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1884 |
How do I change the color of the columns's header to cover all levels (sample CRD)
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColorHeader; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.DefaultItemHeight = 36; axG2antt1.TreeColumnIndex = -1; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Width = 24; var_Column.AllowSizing = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("C2") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2); (var_Columns.Add("Column1") as EXG2ANTTLib.Column).Visible = false; (var_Columns.Add("Column2") as EXG2ANTTLib.Column).Visible = false; (var_Columns.Add("Column3") as EXG2ANTTLib.Column).Visible = false; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("FormatLevel") as EXG2ANTTLib.Column); var_Column2.FormatLevel = "18;\"Info\"[a=17]/(2/3,4)"; var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellFormatLevel,"2/3,4"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("6/22/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.BackColorLevelHeader = axG2antt1.BackColorHeader; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 1.2"); var_Items.set_CellValue(h,2,"Cell 1.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/25/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 2.2"); var_Items.set_CellValue(h,2,"Cell 2.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/26/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/28/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1883 |
Is it possible to extend the columns's header to fill all levels (sample CRD)
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.DefaultItemHeight = 36; axG2antt1.TreeColumnIndex = -1; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Width = 24; var_Column.AllowSizing = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,3); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("C2") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,2); (var_Columns.Add("Column1") as EXG2ANTTLib.Column).Visible = false; (var_Columns.Add("Column2") as EXG2ANTTLib.Column).Visible = false; (var_Columns.Add("Column3") as EXG2ANTTLib.Column).Visible = false; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("FormatLevel") as EXG2ANTTLib.Column); var_Column2.FormatLevel = "18;\"Info\"[a=17]/(2/3,4)"; var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellFormatLevel,"2/3,4"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("6/22/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.BackColorLevelHeader = axG2antt1.BackColorHeader; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 1.2"); var_Items.set_CellValue(h,2,"Cell 1.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/25/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem(""); var_Items.set_CellValue(h,1,"Cell 2.2"); var_Items.set_CellValue(h,2,"Cell 2.3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/26/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/28/2014",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1882 |
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exSortItemsDesc; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("DateTime") as EXG2ANTTLib.Column); var_Column1.SortType = EXG2ANTTLib.SortTypeEnum.SortDateTime; var_Column1.DisplayFilterButton = true; var_Column1.DisplayFilterPattern = false; var_Column1.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exSortItemsDesc; EXG2ANTTLib.Column var_Column2 = (axG2antt1.Columns.Add("Time") as EXG2ANTTLib.Column); var_Column2.SortType = EXG2ANTTLib.SortTypeEnum.SortTime; var_Column2.DisplayFilterButton = true; var_Column2.DisplayFilterPattern = false; var_Column2.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exSortItemsDesc; var_Column2.FormatColumn = "time(value)"; EXG2ANTTLib.Column var_Column3 = (axG2antt1.Columns.Add("Numeric") as EXG2ANTTLib.Column); var_Column3.SortType = EXG2ANTTLib.SortTypeEnum.SortNumeric; var_Column3.DisplayFilterButton = true; var_Column3.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exSortItemsDesc; EXG2ANTTLib.Column var_Column4 = (axG2antt1.Columns.Add("String") as EXG2ANTTLib.Column); var_Column4.DisplayFilterButton = true; var_Column4.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exSortItemsDesc; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(Convert.ToDateTime("1/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,1,Convert.ToDateTime("1/27/2010 10:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,2,var_Items.get_CellValue(h,1)); var_Items.set_CellValue(h,3,1); var_Items.set_CellValue(h,4,var_Items.get_CellValue(h,3)); h = var_Items.AddItem(Convert.ToDateTime("1/27/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,1,Convert.ToDateTime("1/27/2011 9:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,2,var_Items.get_CellValue(h,1)); var_Items.set_CellValue(h,3,11); var_Items.set_CellValue(h,4,var_Items.get_CellValue(h,3)); h = var_Items.AddItem(Convert.ToDateTime("11/2/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,1,Convert.ToDateTime("11/2/2010 9:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,2,var_Items.get_CellValue(h,1)); var_Items.set_CellValue(h,3,2); var_Items.set_CellValue(h,4,var_Items.get_CellValue(h,3)); axG2antt1.Columns["DateTime"].DisplayFilterDate = false; axG2antt1.EndUpdate(); |
1881 |
Is there a way to set the time zone per item
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task A"); var_Items.AddBar(h1,"",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"TZ1","Time Zone / Item"); var_Items.set_ItemBar(h1,"TZ1",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,false); var_Items.set_ItemBar(h1,"TZ1",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,255); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/20/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/29/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Z1",null); h1 = var_Items.AddItem("Task B"); var_Items.AddBar(h1,"",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/24/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"TZ2","Time Zone / Item"); var_Items.set_ItemBar(h1,"TZ2",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,false); var_Items.set_ItemBar(h1,"TZ2",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,65535); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Z1",null); axG2antt1.EndUpdate(); |
1880 |
Is there a way to turn arrow-key-navigation between the items on and off
// KeyDown event - Occurs when the user presses a key while an object has the focus. private void axG2antt1_KeyDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent e) { e.keyCode = 0; } //this.axG2antt1.KeyDownEvent += new AxEXG2ANTTLib._IG2anttEvents_KeyDownEventHandler(this.axG2antt1_KeyDownEvent); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Effort") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,21); var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.NonworkingDays = 0; var_Chart.set_PaneWidth(false,96); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 128; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramPattern = var_Bar.Pattern; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverload; var_Bar.HistogramCriticalValue = 3; var_Bar.ShowHistogramValues = "value>3?255:1"; var_Bar.HistogramItems = -11; var_Bar.HistogramGridLinesColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(192,192,192)); var_Bar.HistogramRulerLinesColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,1)); var_Bar.FormatHistogramValues = "value format `2`"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/21/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,6.79); h1 = var_Items.AddItem("Task 2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/24/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/26/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,3.19); h1 = var_Items.AddItem("Task 3"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/27/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,2); h1 = var_Items.AddItem("Task 4"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/30/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("7/2/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,1); axG2antt1.EndUpdate(); |
1879 |
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("P1") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("P2") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.PartialCheck = true; var_Column1.FormatColumn = "1 index ``"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child A"); var_Items.InsertItem(h,null,"Child B"); var_Items.InsertItem(h,null,"Child A"); var_Items.InsertItem(h,null,"Child B"); var_Items.AddItem("Root"); var_Items.AddItem("Root"); axG2antt1.SingleSort = false; axG2antt1.Layout = "multiplesort=\"C0:1 C1:2\";collapse=\"\""; axG2antt1.EndUpdate(); |
1878 |
How can I decode the Layout property
axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("C1"); (var_Columns.Add("C2") as EXG2ANTTLib.Column).Position = 1; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("SubItem 1.1"),1,"SubItem 1.2"); var_Items.set_CellValue(var_Items.AddItem("SubItem 2.1"),1,"SubItem 2.2"); axG2antt1.Columns["C2"].SortOrder = EXG2ANTTLib.SortOrderEnum.SortDescending; axG2antt1.EndUpdate(); System.Diagnostics.Debug.Print( "Encoded:" ); System.Diagnostics.Debug.Print( axG2antt1.Layout ); // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. EXPRINTLib.Print var_Print = new EXPRINTLib.Print(); System.Diagnostics.Debug.Print( "Decoded: " ); System.Diagnostics.Debug.Print( var_Print.get_Decode64TextW(axG2antt1.Layout) ); |
1877 |
Is it possible to define a bar inside a bar (method 2)
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Tasks"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); EXG2ANTTLib.Notes var_Notes = axG2antt1.Chart.Notes; EXG2ANTTLib.Note var_Note = var_Notes.Add("N1",axG2antt1.Items.FirstVisibleItem,"A1",""); var_Note.set_PartText(EXG2ANTTLib.NotePartEnum.exNoteStart," "); var_Note.set_PartFixedWidth(EXG2ANTTLib.NotePartEnum.exNoteStart,18); var_Note.set_PartFixedHeight(EXG2ANTTLib.NotePartEnum.exNoteStart,11); var_Note.set_PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteStart,true); var_Note.set_PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteStart,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0))); var_Note.set_PartVisible(EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden; var_Note.set_PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteStart,4); axG2antt1.EndUpdate(); |
1876 |
Is it possible to define a bar inside a bar (method 1)
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,TaskB"; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Add("Aka"); var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); var_Bar1.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; EXG2ANTTLib.Bar var_Bar2 = var_Chart.Bars.Add("Task%Aka"); var_Bar2.Shortcut = "TaskB"; var_Bar2.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar2.OverlaidGroup = "Task,TaskB"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Tasks"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.set_ItemBar(h,"A1",EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent,0.25); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); axG2antt1.EndUpdate(); |
1875 |
How do I show the bar with a solid color, no border (method 1)
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1874 |
How do I show the bar with a solid color, no border (method 2)
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bar.StartColor = var_Bar.Color; var_Bar.EndColor = var_Bar.Color; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1873 |
How do I show the bar with a solid color, no border (method 3)
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.AllowLinkBars = false; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.RenderType = -1; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABJkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5AcgPfKgAAFESNY5gSL5Y" + "j2IjrRDCMAggI"); EXG2ANTTLib.Bar var_Bar = axG2antt1.Chart.Bars["Task"]; var_Bar.Color = 0x10000ff; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1872 |
How do I find the cell's type, or what the cell holds
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Value") as EXG2ANTTLib.Column).Width = 24; (var_Columns.Add("Type") as EXG2ANTTLib.Column).FormatColumn = "type(%0)"; (var_Columns.Add("TypeAsString") as EXG2ANTTLib.Column).FormatColumn = "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `b" + "oolean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)"; (var_Columns.Add("Length") as EXG2ANTTLib.Column).FormatColumn = "len(%0)"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(null); var_Items.AddItem(""); var_Items.set_CellValue(.AddItem(null),0,(axG2antt1.GetOcx() as EXG2ANTTLib.G2antt)); var_Items.set_CellValue(var_Items.AddItem(null),0,true); var_Items.set_CellValue(var_Items.AddItem(null),0,-1); var_Items.set_CellValue(var_Items.AddItem(null),0,-1); var_Items.set_CellValue(var_Items.AddItem(null),0,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1871 |
Is it possible to allow changing the bar's parent while bar's start/end margins should stay unchanged
// BarParentChange event - Occurs just before moving a bar from current item to another item. private void axG2antt1_BarParentChange(object sender, AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent e) { axG2antt1.Items.set_SelectItem(e.newItem,true); System.Diagnostics.Debug.Print( "BarParentChange from " ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellCaption(e.item,0) ); System.Diagnostics.Debug.Print( " to " ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellCaption(e.newItem,0) ); } //this.axG2antt1.BarParentChange += new AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEventHandler(this.axG2antt1_BarParentChange); axG2antt1.BeginUpdate(); (axG2antt1.Columns.Add("Members") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = axG2antt1.SelBackColor; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Member <b>1</b>"); int h = var_Items.AddItem("Member <b>2</b>"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T102","Task <b>102</b>"); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove,false); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); var_Items.AddItem("Member <b>3</b>"); var_Items.AddItem("Member <b>4</b>"); axG2antt1.EndUpdate(); |
1870 |
Is it possible to (un)highlight the day/night shifts
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. private void axG2antt1_ClickEvent(object sender, EventArgs e) { EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.ShowNonworkingHours = false; var_Chart.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255)); axG2antt1.Refresh(); } //this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.UnitWidth = 64; var_Chart.set_PaneWidth(false,0); var_Chart.NonworkingHours = 15728895; var_Chart.NonworkingHoursPattern = EXG2ANTTLib.PatternEnum.exPatternSolid; var_Chart.NonworkingDaysPattern = var_Chart.NonworkingHoursPattern; var_Chart.NonworkingHoursColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240)); var_Chart.NonworkingDaysColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(212,212,212)); var_Chart.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(250,250,250)); axG2antt1.EndUpdate(); |
1869 |
How can I add a vertical line at specified date-time
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,18); var_Chart.LevelCount = 2; var_Chart.UnitWidth = 32; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.MarkTimeZone("M1",Convert.ToDateTime("1/5/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),16711680,"50:5;3"); var_Chart.MarkTimeZone("M2",Convert.ToDateTime("1/6/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),16711680,":5"); var_Chart.MarkTimeZone("M3",Convert.ToDateTime("1/7/2010 10:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2010 10:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),255,"50:3;;zone"); |
1868 |
How do I clear all date-time zones
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. private void axG2antt1_ClickEvent(object sender, EventArgs e) { axG2antt1.Chart.RemoveTimeZone("<*>"); } //this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent); // RClick event - Fired when right mouse button is clicked private void axG2antt1_RClick(object sender, EventArgs e) { axG2antt1.Chart.RemoveTimeZone("<Z*>"); } //this.axG2antt1.RClick += new EventHandler(this.axG2antt1_RClick); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,18); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.MarkTimeZone("Z1",Convert.ToDateTime("1/4/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),255,null); var_Chart.MarkTimeZone("Z2",Convert.ToDateTime("1/11/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),65280,null); var_Chart.MarkTimeZone("M1",Convert.ToDateTime("1/7/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")),16711680,"50:5;3"); |
1867 |
How do I place a comment above/bellow the bar (sample 4)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 26; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption," "); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,0); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign,16); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<font ;6>user comment"); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<font ;6>user comment"); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment"); axG2antt1.EndUpdate(); |
1866 |
How do I place a comment above/bellow the bar (sample 3)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 26; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<font ;6>user comment"); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment"); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,0); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVAlign,16); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<font ;6>user comment"); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"<font ;6>user comment"); axG2antt1.EndUpdate(); |
1865 |
How do I place a comment under the bar (sample 2)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 26; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18); var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<font ;6>user comment"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<font ;6>user comment"); axG2antt1.EndUpdate(); |
1864 |
How do I place a comment under the bar (sample 1)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 26; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<font ;6>user comment"); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption,18); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<font ;6>user comment"); axG2antt1.EndUpdate(); |
1863 |
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 2)
// BarParentChange event - Occurs just before moving a bar from current item to another item. private void axG2antt1_BarParentChange(object sender, AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent e) { axG2antt1.Items.set_SelectItem(e.newItem,true); e.cancel = axG2antt1.ConditionalFormats["NOTRED"].get_Verify(e.newItem); } //this.axG2antt1.BarParentChange += new AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEventHandler(this.axG2antt1_BarParentChange); // ChartEndChanging event - Occurs after the chart has been changed. private void axG2antt1_ChartEndChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent e) { (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).SelForeColor = 0x8000000e; (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).SelBackColor = 0x8000000d; axG2antt1.Chart.SelBackColor = axG2antt1.SelBackColor; axG2antt1.ConditionalFormats.Clear(); } //this.axG2antt1.ChartEndChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEventHandler(this.axG2antt1_ChartEndChanging); // ChartStartChanging event - Occurs when the chart is about to be changed. private void axG2antt1_ChartStartChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent e) { axG2antt1.SelForeColor = axG2antt1.ForeColor; axG2antt1.SelBackColor = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = var_Chart.BackColor; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("%0 contains `Allowed` ","RED"); var_ConditionalFormat.Enabled = false; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat1 = axG2antt1.ConditionalFormats.Add("not ( %0 contains `Allowed` )","NOTRED"); var_ConditionalFormat1.BackColor = 0x1fefefe; var_ConditionalFormat1.ChartBackColor = var_ConditionalFormat1.BackColor; } //this.axG2antt1.ChartStartChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEventHandler(this.axG2antt1_ChartStartChanging); axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABZkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUbyDBIGQSCCZYDmKA3f" + "j0AI9P7FcgSABEEigNIxToOU4jFgeCR2TqQRK1BDQbQSFCaZrmMKIXICO40WBQFhTdLlRyBBKzLKtCyaBqWaZrWxZE72ZaFVTdOK6bDvGwoarid56X7beA2PgdZTjQi5" + "cCxG5sLrTBZtYzfET3diOEYPQzHMpzDB7bxbGaXZBlGSZbjeGZBUjQc7yfSNMw/HqKZQ6cQwTAIgI"); (axG2antt1.Columns.Add("Members") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = axG2antt1.SelBackColor; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.AllowSelectObjects = EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Member <b>1</b>"); h = var_Items.AddItem("Member <b>Allowed</b>"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T102","Task <b>102</b>"); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); h = var_Items.AddItem("Member <b>Allowed</b>"); h = var_Items.AddItem("Member <b>4</b>"); axG2antt1.EndUpdate(); |
1862 |
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 1)
// BarParentChange event - Occurs just before moving a bar from current item to another item. private void axG2antt1_BarParentChange(object sender, AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent e) { axG2antt1.Items.set_SelectItem(e.newItem,true); e.cancel = axG2antt1.ConditionalFormats["NOTRED"].get_Verify(e.newItem); } //this.axG2antt1.BarParentChange += new AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEventHandler(this.axG2antt1_BarParentChange); // ChartEndChanging event - Occurs after the chart has been changed. private void axG2antt1_ChartEndChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent e) { (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).SelForeColor = 0x8000000e; (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).SelBackColor = 0x8000000d; axG2antt1.Chart.SelBackColor = axG2antt1.SelBackColor; axG2antt1.ConditionalFormats.Clear(); } //this.axG2antt1.ChartEndChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEventHandler(this.axG2antt1_ChartEndChanging); // ChartStartChanging event - Occurs when the chart is about to be changed. private void axG2antt1_ChartStartChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent e) { axG2antt1.SelForeColor = axG2antt1.ForeColor; axG2antt1.SelBackColor = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = var_Chart.BackColor; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("%0 contains `Allowed` ","RED"); var_ConditionalFormat.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,128,128)); var_ConditionalFormat.ChartBackColor = var_ConditionalFormat.BackColor; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat1 = axG2antt1.ConditionalFormats.Add("not ( %0 contains `Allowed` )","NOTRED"); var_ConditionalFormat1.Enabled = false; } //this.axG2antt1.ChartStartChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEventHandler(this.axG2antt1_ChartStartChanging); axG2antt1.BeginUpdate(); (axG2antt1.Columns.Add("Members") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = axG2antt1.SelBackColor; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.AllowSelectObjects = EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Member <b>1</b>"); h = var_Items.AddItem("Member <b>Allowed</b>"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T102","Task <b>102</b>"); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); h = var_Items.AddItem("Member <b>Allowed</b>"); h = var_Items.AddItem("Member <b>4</b>"); axG2antt1.EndUpdate(); |
1861 |
How can I check, if a specified item fits a specified conditional format expression
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { int h = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); System.Diagnostics.Debug.Print( axG2antt1.ConditionalFormats["RED"].get_Verify(h).ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; axG2antt1.Chart.SelBackColor = axG2antt1.SelBackColor; axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); EXG2ANTTLib.ConditionalFormats var_ConditionalFormats = axG2antt1.ConditionalFormats; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = var_ConditionalFormats.Add("%1 = 5","RED"); var_ConditionalFormat.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,128,128)); var_ConditionalFormat.ChartBackColor = var_ConditionalFormat.BackColor; axG2antt1.EndUpdate(); |
1860 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 3)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.SelBackColor = axG2antt1.SelBackColor; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); EXG2ANTTLib.ConditionalFormats var_ConditionalFormats = axG2antt1.ConditionalFormats; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = var_ConditionalFormats.Add("%1 in (3,5)",null); var_ConditionalFormat.ApplyToBars = "Task"; var_ConditionalFormat.BarColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.BarOverviewColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.ForeColor = var_ConditionalFormat.BarColor; var_ConditionalFormat.Bold = true; axG2antt1.EndUpdate(); |
1859 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 2)
|
1858 |
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 1)
|
1857 |
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called. private void axG2antt1_OLEStartDrag(object sender, AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent e) { // Data.SetData("data to drag") e.allowedEffects = 1; } //this.axG2antt1.OLEStartDrag += new AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEventHandler(this.axG2antt1_OLEStartDrag); axG2antt1.OLEDropMode = EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual; axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropAfter,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255))); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); |
1856 |
How do I change the visual appearance of the split bars
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABEgDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZBGUBJDjWGgyQjOEByD" + "IMRwjE6UZBgeCRViEMo9RrSEZSLAdGRFAaVYDdULBEACU5VRZQFCwTQcBhpIyoZpkECobh2TYgQjYNT1NSkLxeGoSbbuGhBQrOAw1XTEMhyDR0LTJM6bMBACqrBi2L4x" + "URfOBRXLQAYbHjAZ7rSgacjKRpKRbmAV4Oh+O5pQjadp1TidNwHLoAK7nGwbbgmfwAZrAdjABj1HgBNS2dDkaabQrKEZ4XYAHAXVROOQTWIANb2XC4bwSLAwTJJYzjTh" + "iC2GInFOOQckiVw6AeCIvHSBzkCwDxfE6WZ2jsehICadx5kGYZdDgMRrA2c4NmWY56jyGxgEQJIgGkGJHEGVByBkWoCjkNAAAQIQ2AYRoDGQJAoKuZYgBgRZHggHZqAk" + "AZDjYGA7E8KB0kyB5LiiBgigiYhIgiQ4Jk4WIkn6CphjQDgbDmIwDBIMg3GMQ4uDaDZjgiZg6DIY5DGIPg/GQBAMneEJMFkFJqhGTppCYSoSmSSQ2EoPJlAMIhSDmZRE" + "AyVYVk0eRkm+FpkmkdhehaTp4iSZQxiYRAODIMQODmJJxhqTwJjYbobmcCZGHKGxLjmVQDC+J4DiYeg8GGWYuH6H5oAoBoCgcTwimaBodmeGZongPRPCoCoOiOZ5qBII" + "oiAuaZomkPoPGOToEiaaZKHaHYfiUA5OhMAAngoVh6iYKYqHqKoqmGWoGiOKRkHOKJ7D2TxKgaNotmuCpmFAPQrkqPh4iwaw6laOowmwOpwnSL4LmiXJ9D4TxbBqTozm" + "0CxGjwPRtEsIJsjWT4Dlydo1C2Sx2l6N5uAOWpijIDpbhYQ42i4K4mmqOpukuMpnjIJIjmKco5m8S5WnaPZkDuSJ4h0S46FKcY8m+DAHAGPovkoUhgD4cILmsCpCnCTA" + "2nKQgPhwFokh4JpjmsFpEDGDBnBqRpwgwWJ6kSKhZjie5FnGTIXCWR4yAmYh+D+D48g8HpLnMDJHDIPoylObwpWIY5/CyTJzkydw1kSIhzA6ZQ7E+fJrDWUZ0g0JxKks" + "T5NDSPJTmUaRcmAN5Nn0FJ/lMdYNGcWpWnWHRaGAMZ2AQDoEDKNhLicVpViQDYnGqWpPl2HxFDQNwJgoLoGGaCcDInRdjMCuNYbovR2D2FyNgNIcAJC5FWKwNwcBqAzC" + "WBoPgTA8BkEwFwN4HRjjyAMH8EgcQ5CaGIFoAAHQ3AgAAIAQBAQ=="); var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABBYDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZTgMYRSASI43RoMUIzV" + "AcQxDEaIZLlGQYHgkNIhDJPcZ0VDUbQGBiQIRmIAHNBwJJUVZFdBDLQkQy5HapZDkECobA+CZQTzUUI1LS9WS1HYaRJle4YRDUMJyQjdV4TRINHQvMinYzqOzrOhaW5T" + "SzLcqyCK0SxxR4AJ4yGobJjiQYJShXcxyDQ8dyZC7PQohG7ofxUAKDVjhMjZRQeMS9JCwaThHElRQHMyBdJkKA9Iq2WaGXBeeQ3JbNbzrYzHb5hHZgAzTOoWbzWFT8BJ" + "OFOCAYGcJJjHGTh+C2H40AAL5ckyBQDFkKoWHYLw9iGTpGDUY4zkIdwbF8JhbgMc5hF6OJ8C6BhTkOcBAlsR4NnQaAflAIQJBQBoRgwdAdEcIYVEUQJBGYOBCBMYQUGg" + "NhCEKB5FB4VBBgQXJgF+IAzA4Ig5GIQIQBwOxiGiIgngoYpIi4LoKiMA5KDIMwjEKakmk6OJkkmDpNgidgtgwI55AYJw5iQQwSEYNxkgiZJrEITppDSc4TkyCREmeFJk" + "CkAkLmWAwWFoOolkkNheDuJJJDSb4YmIQ4UkaGZlFkVJVhqTR5jYYw7mWeQ1AkPAnEmVh1C6Z4JiYL4KGQYwQmOH5PBoBh2h0EIaAaBg8GMI5Ij6IpokoNoOiOaJDiaE" + "oiA8KgegGIRpGoZoaiaaZDmCdYlGkZAmgmKJqEqFomimaoKCaIoqGqSo2iwQhknqRoyiyaxKlaNotk8OpCjiLprkqbQJD0LALAaQowmwSwWkaMZQhOVpKjKbJLDaTozm" + "0CxFAkPYtEsVpWjWbYLGaWo2lCGRil6N5pAuBpiDsbhLH6Zo3G4ax6HhYgpFibYjCWa4ml4QhPguVp2D4b4Li6bYPmiSZWngPhvGuWQJj+b5zmsBo+iePAmDCIwoGwGJ" + "6kEL4MA8EJDjCC46FWQwoBObwGkQD4UCcDpDg+PIHBWPpiHwYJxD+MgcH8BpH4cBJ7kicIrnKC4hg+fIjCoPoQhyOwuD8M5CnMPpJCMCIIkOOQOlOfw1k6MnJDwPw0GO" + "fhvDGdQNAIKdalOAJfDedJdC8SxCeyNJQleZhdEoJ4iEyLYWlWVx0GQJJslqTQtjcVJYi6aZ8mMM43EmFwCECJkfYyWiDuAuG0EgdBNB8AYHYMgxwEM1EAIAgIA=="); var_Appearance.Add(3,"CP:2 -2 -2 2 2"); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bars var_Bars = var_Chart.Bars; EXG2ANTTLib.Bar var_Bar = var_Bars.Add("A"); var_Bar.Height = 15; var_Bar.Color = 0x2000000; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; EXG2ANTTLib.Bar var_Bar1 = var_Bars.Add("Task:A"); var_Bar1.Shortcut = "Task"; var_Bar1.Height = 15; var_Bar1.Color = 0x1000000; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Chart.NonworkingDaysColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240)); var_Chart.SelBarColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65535); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); h = var_Items.AddItem("Task 4"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,58753152); h = var_Items.AddItem("Task 5"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,25198720); h = var_Items.AddItem("Task 6"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarNonWorkingColor,2130771712); axG2antt1.EndUpdate(); |
1855 |
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it
axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Tasks") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 36; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("4/6/2009",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Add("Task:Progress"); var_Bar.Shortcut = "TaskS"; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=((1:=int(0:= (%258))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != " + "0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>"); var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("T1"),"TaskS",Convert.ToDateTime("4/10/2009 2:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("4/16/2009 2:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("T2"),"TaskS",Convert.ToDateTime("4/14/2009 9:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("4/22/2009 10:10:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); axG2antt1.EndUpdate(); |
1854 |
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it
axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Tasks") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 36; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("4/6/2009",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.Bars["Task"].set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=((1:=int(0:= (%513))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != " + "0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("T1"),"Task",Convert.ToDateTime("4/6/2009 2:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("4/6/2009 12:35:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("T2"),"Task",Convert.ToDateTime("4/6/2009 9:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("4/6/2009 10:10:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); axG2antt1.EndUpdate(); |
1853 |
Does it support single or multiple split pane views
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(40,40,40))); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,76); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Summary"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternShadow; var_Bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); var_Bar.StartColor = var_Bar.Color; var_Bar.EndColor = var_Bar.Color; var_Chart.AllowSplitPane = EXG2ANTTLib.AllowSplitPaneEnum.exAllowTwoSplitPane | EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane; var_Chart.SplitPaneWidth = "128,128"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("2/23/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/27/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); axG2antt1.EndUpdate(); |
1852 |
How can I programmatically add more split panes ( by code)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,76); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Summary"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternShadow; var_Bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); var_Bar.StartColor = var_Bar.Color; var_Bar.EndColor = var_Bar.Color; var_Chart.AllowSplitPane = EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("2/23/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/27/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); EXG2ANTTLib.Chart var_Chart1 = axG2antt1.Chart; var_Chart1.ScrollTo(var_Chart1.EndPrintDate,1); var_Chart1.SplitPaneWidth = "128,128,128"; var_Chart1.ScrollTo(var_Chart1.StartPrintDate,1); axG2antt1.EndUpdate(); |
1851 |
How can I programmatically add a split pane, or adding a split view at runtime
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(40,40,40))); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,76); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Summary"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternShadow; var_Bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); var_Bar.StartColor = var_Bar.Color; var_Bar.EndColor = var_Bar.Color; var_Chart.AllowSplitPane = EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("2/23/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/27/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); EXG2ANTTLib.Chart var_Chart1 = axG2antt1.Chart; var_Chart1.ScrollTo(var_Chart1.EndPrintDate,1); var_Chart1.SplitPaneWidth = "128"; var_Chart1.ScrollTo(var_Chart1.StartPrintDate,1); axG2antt1.EndUpdate(); |
1850 |
Is there any way, property, procedure or anything else to split the control into multiple views
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(40,40,40))); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,76); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Summary"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternShadow; var_Bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); var_Bar.StartColor = var_Bar.Color; var_Bar.EndColor = var_Bar.Color; var_Chart.AllowSplitPane = EXG2ANTTLib.AllowSplitPaneEnum.exAllowOneSplitPane; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("2/23/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/27/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); axG2antt1.EndUpdate(); |
1849 |
It appears that I can not use the ItemFromPoint property in my environment. What else I can do
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { System.Diagnostics.Debug.Print( axG2antt1.ExecuteTemplate("Dim c, hit; ItemFromPoint(-1,-1, c, hit )").ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Default") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1848 |
How can I change the color for selected links (ebn)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.RenderType = -2; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB" + "iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" + "YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" + "xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" + "F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA=="); var_Appearance.Add(2,"CP:1 -2 -2 2 2"); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksWidth = 2; var_Chart.SelLinkColor = 0x20000ff; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,true); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h2,"",h3,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1847 |
How can I change the color for selected links (color, no frame)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksWidth = 2; var_Chart.SelLinkColor = 0x7f0000ff; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,true); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h2,"",h3,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1846 |
How can I change the color for selected links (color, frame)
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksWidth = 2; var_Chart.SelLinkColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkSelected,true); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h2,"",h3,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1845 |
By default, the bar gets selected once the user releases the button of the mouse. Is it possible to change this behavior so the bar gets selected once the user presses the button of the mouse
// MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { int h = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); object b = axG2antt1.Chart.get_BarFromPoint(-1,-1); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,false); var_Items.set_ItemBar(h,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 32; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZB" + "iOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6r" + "YzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2Tx" + "xgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" + "F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA=="); var_Appearance.Add(2,"CP:1 -2 -2 2 2"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowSelectObjects = EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.SelBarColor = 0x2000000; var_Chart.set_PaneWidth(false,48); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/11/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); axG2antt1.EndUpdate(); |
1844 |
How can I change the bar's color (sample 3, ebn, individual, global)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.RenderType = -2; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH" + "IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" + "STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" + "FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" + "XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC"); var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" + "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" + "aZACj4arKejrRDCMAggI="); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Color = 0x1000000; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars["Summary"]; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar1.Color = 0x2000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummaryJ = var_Items.AddItem("Summary A"); var_Items.AddBar(hSummaryJ,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J",null); int hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.1"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J1",null); hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.2"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J2",null); var_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>"); int hSummaryK = var_Items.AddItem("Summary B"); var_Items.AddBar(hSummaryK,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K",null); int hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.1"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.2"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>"); var_Items.set_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1843 |
How can I change the bar's color (sample 2, global)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars["Summary"]; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bar1.StartColor = var_Bar1.Color; var_Bar1.EndColor = var_Bar1.Color; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummaryJ = var_Items.AddItem("Summary A"); var_Items.AddBar(hSummaryJ,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J",null); int hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.1"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J1",null); hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.2"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J2",null); var_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>"); int hSummaryK = var_Items.AddItem("Summary B"); var_Items.AddBar(hSummaryK,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K",null); int hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.1"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.2"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>"); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1842 |
How can I change the bar's color (sample 1, individual)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Chart.Bars["Summary"].set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummaryJ = var_Items.AddItem("Summary A"); var_Items.AddBar(hSummaryJ,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J"," (default)"); int hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.1"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J1","(default)"); hTaskJ = var_Items.InsertItem(hSummaryJ,null,"Task A.2"); var_Items.AddBar(hTaskJ,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"J2","(default)"); var_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>"); int hSummaryK = var_Items.AddItem("Summary B"); var_Items.AddBar(hSummaryK,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K",null); int hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.1"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTaskK = var_Items.InsertItem(hSummaryK,null,"Task B.2"); var_Items.AddBar(hTaskK,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>"); var_Items.set_ItemBar(hSummaryK,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ItemBar(0,"<K*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1841 |
How do I make the control read-only (method 2)
// Edit event - Occurs just before editing the focused cell. private void axG2antt1_EditEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_EditEvent e) { e.cancel = true; } //this.axG2antt1.EditEvent += new AxEXG2ANTTLib._IG2anttEvents_EditEventHandler(this.axG2antt1_EditEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Editor") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckListType; var_Editor.AddItem(1,"One",null); var_Editor.AddItem(2,"Two",null); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor1 = var_Column.Editor; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; var_Editor1.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue1,2); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,0); var_Items.set_CellValue(var_Items.AddItem(2),1,1); axG2antt1.EndUpdate(); |
1840 |
How do I make the control read-only (method 1)
axG2antt1.BeginUpdate(); axG2antt1.ReadOnly = EXG2ANTTLib.ReadOnlyEnum.exReadOnly; EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Editor") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckListType; var_Editor.AddItem(1,"One",null); var_Editor.AddItem(2,"Two",null); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor1 = var_Column.Editor; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; var_Editor1.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue1,2); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,0); var_Items.set_CellValue(var_Items.AddItem(2),1,1); axG2antt1.EndUpdate(); |
1839 |
The ReadOnly property does not prevent changing the column's check-box (sample 2)
axG2antt1.BeginUpdate(); axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 18; var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(0),1,"Item 1"); var_Items.set_CellValue(var_Items.AddItem(-1),1,"Item 2"); var_Items.set_CellValue(var_Items.AddItem(0),1,"Item 3"); axG2antt1.ReadOnly = EXG2ANTTLib.ReadOnlyEnum.exReadOnly; axG2antt1.Columns[0].Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue2,2); axG2antt1.EndUpdate(); |
1838 |
The ReadOnly property does not prevent changing the column's check-box (sample 1)
axG2antt1.BeginUpdate(); axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("C1") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 18; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1); axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(0),1,"Item 1"); var_Items.set_CellValue(var_Items.AddItem(-1),1,"Item 2"); var_Items.set_CellValue(var_Items.AddItem(0),1,"Item 3"); axG2antt1.ReadOnly = EXG2ANTTLib.ReadOnlyEnum.exReadOnly; axG2antt1.EndUpdate(); |
1837 |
How can I change the visual appearance of the control's split bar (sample 3)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABPsIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRokAYYRDIMg5SBIETzFIMCQ9AaaJpieRJG" + "iiKoJSxHErgFD8QxzEKOZqnCapViAMpOAZQAwDAIoWhpKKBRhqOpRUhaID/WAAFCUZK4ASTDCyLRgNy4lACgI"); var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABPkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRoiEYhXDiIAxARHcgyBIMPQJGSaZpkSRpI" + "iqHItS6BM4RVKkcw7G6BaJnGJpADKTQGQiMIwDAIoWhpKCBaiqSpqMglf5fg6pOJqHACZZKWLNLpxDBMAkBA="); var_Appearance.Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGQCwTCIYhmHKSRhGSIRSDcOIgDCBEbyDIEQw9AiZZqmaRZH" + "imK4cS5MEhwHKsLSLGyOZwoSapbgmJooU5KUwSYKQcxBI6laYpIAKJhiWobTxUEBwMKlJw5KoBJxjKqIbp2XZsUxIAxXEA1HBgGASRZGS5bDreeQ0UZCL74GAFUy/Lib" + "a6weqnLhGCYBgIA=="); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,0x1808080); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,0x2808080); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,0x3010101); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,64); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.OverviewHeight = 48; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll; axG2antt1.EndUpdate(); |
1836 |
How can I change the color for the control's split bar (sample 2)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Default"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(190,190,190))); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,1))); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,64); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.OverviewHeight = 48; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll; axG2antt1.EndUpdate(); |
1835 |
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 2 )
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(""); int h = var_Items.AddItem("Item"); var_Items.AddItem(""); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); EXG2ANTTLib.Notes var_Notes = axG2antt1.Chart.Notes; EXG2ANTTLib.Note var_Note = var_Notes.Add("Attention",axG2antt1.Items[1],"A"," <font ;11>! "); var_Note.RelativePosition = 0.5; var_Note.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden; var_Note.set_PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd,0); var_Note.set_PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.set_PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,0))); axG2antt1.EndUpdate(); |
1834 |
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 1 )
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(""); int h = var_Items.AddItem("Item"); var_Items.AddItem(""); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"[text=`<bgcolor=FFFF00><font ;11> ! `,align=0x11]"); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,8); axG2antt1.EndUpdate(); |
1833 |
How do I get the "Summary" bar being shown in the control's histogram (sample 2)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" + "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" + "aZACj4arKejrRDCMAggI="); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping | EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramPattern = var_Bar.Pattern; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative; var_Bar.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(hSummary,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16777216); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/17/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); axG2antt1.EndUpdate(); |
1832 |
How do I get the "Summary" bar being shown in the control's histogram (sample 1)
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" + "h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" + "aZACj4arKejrRDCMAggI="); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping | EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramPattern = var_Bar.Pattern; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars["Summary"]; var_Bar1.Color = 0x1000000; var_Bar1.HistogramColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,1)); var_Bar1.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/17/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); axG2antt1.EndUpdate(); |
1831 |
How can I temporarily/programmatically hide the control's tooltip
// RClick event - Fired when right mouse button is clicked private void axG2antt1_RClick(object sender, EventArgs e) { int nToolTipDelay = axG2antt1.ToolTipDelay; axG2antt1.ToolTipDelay = 0; axG2antt1.ToolTipDelay = nToolTipDelay; } //this.axG2antt1.RClick += new EventHandler(this.axG2antt1_RClick); axG2antt1.BeginUpdate(); (axG2antt1.Columns.Add("Column w/h tooltip...") as EXG2ANTTLib.Column).ToolTip = "This is a bit of text that's shown when the cursor hovers the column.<br><br><sha ;;0><c>Right-Click to hide it</sha>"; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay; var_Chart.MonthNames = var_Chart.LocMonthNames; var_Chart.WeekDays = var_Chart.LocWeekDays; var_Chart.AMPM = var_Chart.LocAMPM; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,128); var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Flat; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; axG2antt1.EndUpdate(); |
1830 |
Is it possible to find out the handle of the item, giving the key of the bar only
axG2antt1.BeginUpdate(); axG2antt1.Debug = true; axG2antt1.DefaultItemHeight = 32; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.Bars["Task"].Height = 16; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBold(var_Items.get_ItemBar(0,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarParent),true); axG2antt1.EndUpdate(); |
1829 |
How can I programmatically add a link between two bars, knowing the keys of these bars only
axG2antt1.BeginUpdate(); axG2antt1.Debug = true; axG2antt1.DefaultItemHeight = 32; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.Bars["Task"].Height = 16; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"AK2",null); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"AK3",null); var_Items.AddLink("Link1",0,"K1",0,"AK2"); var_Items.AddLink("Link2",0,"K1",0,"<A?3>"); var_Items.AddLink("Link3",0,"<*2>",0,"AK3"); axG2antt1.EndUpdate(); |
1828 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exSolidLine; axG2antt1.Indent = 16; axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.FormatColumn = "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` : (=:0 mid (1 + 1 + =:1) ) + `)` ) + ` ` + value"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); int hChild = var_Items.InsertItem(h,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); var_Items.set_ExpandItem(0,true); h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); hChild = var_Items.InsertItem(h,null,"Child"); var_Items.set_CellState(hChild,0,1); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); axG2antt1.EndUpdate(); |
1827 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.GridLineColor = Color.FromArgb(190,190,190); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exSolidLine; axG2antt1.Indent = 16; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Default"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingRight,4); var_Column.AllowSizing = false; var_Column.Width = 36; var_Column.Position = 0; var_Column.FormatColumn = "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =" + ":1) ) "; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); int hChild = var_Items.InsertItem(h,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); var_Items.set_ExpandItem(0,true); h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); hChild = var_Items.InsertItem(h,null,"Child"); var_Items.set_CellState(hChild,0,1); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); axG2antt1.EndUpdate(); |
1826 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exSolidLine; axG2antt1.Indent = 16; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Default"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingRight,4); var_Column.Alignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; var_Column.AllowSizing = false; var_Column.Width = 24; var_Column.Position = 0; var_Column.FormatColumn = "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); int hChild = var_Items.InsertItem(h,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); var_Items.set_ExpandItem(0,true); h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child"); hChild = var_Items.InsertItem(h,null,"Child"); var_Items.set_CellState(hChild,0,1); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(hChild,null,"Child"); var_Items.InsertItem(h,null,"Child"); axG2antt1.EndUpdate(); |
1825 |
How can I programmatically group by columns, without having the control's sort bar visible
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.SortBarHeight = 0; axG2antt1.SortBarVisible = true; axG2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; axG2antt1.AllowGroupBy = true; axG2antt1.Layout = "multiplesort=\"C1:2\""; axG2antt1.EndUpdate(); |
1824 |
How do I perform my own sort
// Sort event - Fired when the control sorts a column. private void axG2antt1_Sort(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "Sort" ); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_ItemPosition(var_Items[1],0); var_Items.set_ItemPosition(var_Items[0],1); } //this.axG2antt1.Sort += new EventHandler(this.axG2antt1_Sort); axG2antt1.BeginUpdate(); axG2antt1.SingleSort = false; axG2antt1.SortOnClick = EXG2ANTTLib.SortOnClickEnum.exUserSort; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Index") as EXG2ANTTLib.Column).FormatColumn = "0 index ``"; var_Columns.Add("Data 1"); var_Columns.Add("Data 2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(0); var_Items.set_CellValue(h,1,2); var_Items.set_CellValue(h,2,3); h = var_Items.AddItem(4); var_Items.set_CellValue(h,1,5); var_Items.set_CellValue(h,2,6); h = var_Items.AddItem(7); var_Items.set_CellValue(h,1,8); var_Items.set_CellValue(h,2,9); axG2antt1.Layout = "multiplesort=\"C1:1 C2:2\""; axG2antt1.EndUpdate(); |
1823 |
Is it possible to have a different alignment for parts of the cell's caption
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,true); axG2antt1.TreeColumnIndex = -1; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Default") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellHAlignment(var_Items.AddItem("all-left"),0,EXG2ANTTLib.AlignmentEnum.LeftAlignment); var_Items.set_CellHAlignment(var_Items.AddItem("all-center"),0,EXG2ANTTLib.AlignmentEnum.CenterAlignment); var_Items.set_CellHAlignment(var_Items.AddItem("all-right"),0,EXG2ANTTLib.AlignmentEnum.RightAlignment); int h = var_Items.AddItem("left<c>center<r>right"); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); axG2antt1.EndUpdate(); |
1822 |
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("MultipleLine") as EXG2ANTTLib.Column); var_Column.Width = 32; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exColumnResizeContiguously,true); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("SingleLine") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("This is a bit of long text that should break the line"),1,"This is a bit of long text that should break the line"); axG2antt1.EndUpdate(); |
1821 |
Is there an other way to detect if a bar is overlapping any other bar
// BarResizing event - Occurs when a bar is moving or resizing. private void axG2antt1_BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e) { axG2antt1.Refresh(); } //this.axG2antt1.BarResizing += new AxEXG2ANTTLib._IG2anttEvents_BarResizingEventHandler(this.axG2antt1_BarResizing); axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Intersect / Count") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,521); var_Column.LevelKey = 1; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add(" / With") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,520); var_Column1.LevelKey = 1; axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,148); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset; var_Bar.OverlaidGroup = "TaskB"; var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Add("TaskB"); var_Bar1.Pattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); h = var_Items.AddItem("A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); h = var_Items.AddItem("A"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B1","B1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B2","B2"); h = var_Items.AddItem("A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B1","B1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B2","B2"); axG2antt1.EndUpdate(); |
1820 |
How can I get the absolute position of an item
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",Convert.ToDateTime("1/2/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; System.Diagnostics.Debug.Print( var_Items.get_CellCaption(axG2antt1.get_ItemFromPoint(-1,-1,c,hit),"Position") ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; (axG2antt1.Columns.Add("Def") as EXG2ANTTLib.Column).DisplayFilterButton = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(var_Items.InsertItem(h,null,"Child 1"),null,"Sub-Child 1"); var_Items.InsertItem(var_Items.InsertItem(h,null,"Child 2"),null,"Sub-Child 2"); axG2antt1.PutItems(axG2antt1.GetItems(-1),null); axG2antt1.PutItems(axG2antt1.GetItems(-1),null); axG2antt1.PutItems(axG2antt1.GetItems(-1),null); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Position") as EXG2ANTTLib.Column); var_Column.FormatColumn = "1 apos ``"; var_Column.Visible = false; axG2antt1.EndUpdate(); |
1819 |
How do I sort the index column as numeric (Method 2)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellData(e.item,1,var_Items.get_CellCaption(e.item,1)); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.ColumnAutoResize = true; axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Next") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft,4); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exHeaderPaddingLeft,4); EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Index") as EXG2ANTTLib.Column); var_Column1.AllowSizing = false; var_Column1.Width = 48; var_Column1.FormatColumn = "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"; var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column1.SortType = EXG2ANTTLib.SortTypeEnum.SortUserData; var_Column1.Position = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item 1"); var_Items.AddItem("Item 2"); var_Items.AddItem("Item 3"); var_Items.AddItem("Item 4"); var_Items.AddItem("Item 5"); var_Items.AddItem("Item 6"); var_Items.AddItem("Item 7"); var_Items.AddItem("Item 8"); var_Items.AddItem("Item 9"); var_Items.AddItem("Item 10"); axG2antt1.EndUpdate(); |
1818 |
How do I sort the index column as numeric (Method 1)
axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Sort Index As String (Default)") as EXG2ANTTLib.Column); var_Column.FormatColumn = "1 index ``"; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Sort Index As Numeric") as EXG2ANTTLib.Column); var_Column1.ComputedField = "%C0"; var_Column1.SortType = EXG2ANTTLib.SortTypeEnum.SortNumeric; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); axG2antt1.EndUpdate(); |
1817 |
How can I put icons/images into buttons
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("C+B") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 48; var_Column.FormatColumn = "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasButton,true); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth,true); axG2antt1.Columns.Add(""); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.DefaultItemHeight = 20; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); axG2antt1.EndUpdate(); |
1816 |
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column
// ButtonClick event - Occurs when user clicks on the cell's button. private void axG2antt1_ButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent e) { System.Diagnostics.Debug.Print( "ButtonClick" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.key.ToString() ); } //this.axG2antt1.ButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ButtonClickEventHandler(this.axG2antt1_ButtonClick); // CellStateChanged event - Fired after cell's state has been changed. private void axG2antt1_CellStateChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent e) { System.Diagnostics.Debug.Print( "CellStateChanged" ); System.Diagnostics.Debug.Print( e.item.ToString() ); } //this.axG2antt1.CellStateChanged += new AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEventHandler(this.axG2antt1_CellStateChanged); axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 32; var_Column.FormatColumn = "1 index ``"; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Def") as EXG2ANTTLib.Column); var_Column1.AllowSizing = false; var_Column1.Width = 48; var_Column1.FormatColumn = "` `"; var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasButton,true); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth,true); axG2antt1.Columns.Add(""); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); var_Items.AddItem(""); axG2antt1.EndUpdate(); |
1815 |
Does filtering work with umlauts / accents characters
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Names") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exPattern; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Mantel"); var_Items.AddItem("Mechanik"); var_Items.AddItem("Motor"); var_Items.AddItem("Murks"); var_Items.AddItem("Märchen"); var_Items.AddItem("Möhren"); var_Items.AddItem("Mühle"); var_Items.AddItem("Sérigraphie"); axG2antt1.Columns[0].Filter = "*ä*"; axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1814 |
How can I temporarily disable resizing the overview part of the control
axG2antt1.BeginUpdate(); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; axG2antt1.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exDisableOverview; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale | EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.OverviewHeight = 32; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1813 |
Is it possible to resize the overview part of the control at runtime
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC" + "hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" + "JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" + "gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" + "FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" + "Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" + "5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" + "cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" + "xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" + "QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" + "SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" + "xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" + "fxEh1guAIAwQAgCAg"); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale | EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.OverviewHeight = 32; var_Chart.OverviewSelBackColor = 0x1000000; var_Chart.OverviewBackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(250,250,250)); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1812 |
You've provided examples of how to create bars for each record of a MS Access table, however I would like to create a database connected Gantt that has multiple bars per item/resource. Could you please advise
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void axG2antt1_AddGroupItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Summary",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),"0",null); var_Items.DefineSummaryBars(e.item,"0",-3,"0"); var_Items.AddBar(e.item,"SummaryB",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),"1",null); var_Items.DefineSummaryBars(e.item,"1",-3,"1"); var_Items.set_ItemBackColor(e.item,(uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240))); axG2antt1.Chart.set_ItemBackColor(e.item,(uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240))); } //this.axG2antt1.AddGroupItem += new AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEventHandler(this.axG2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),var_Items.get_ItemBar(e.item,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount),null); var_Items.AddBar(e.item,"TaskB",var_Items.get_CellValue(e.item,3),var_Items.get_CellValue(e.item,4),var_Items.get_ItemBar(e.item,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount),null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { int i = axG2antt1.get_ItemFromPoint(-1,-1,c,hit); axG2antt1.FullRowSelect = axG2antt1.Columns[c].Data; } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.HeaderHeight = 22; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Flat; axG2antt1.BackColorLock = Color.FromArgb(240,240,240); axG2antt1.BackColorHeader = axG2antt1.BackColorLock; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exNoLine; axG2antt1.ColumnAutoResize = false; axG2antt1.SortBarVisible = false; axG2antt1.AllowGroupBy = true; axG2antt1.ReadOnly = EXG2ANTTLib.ReadOnlyEnum.exReadOnly; axG2antt1.ShowFocusRect = false; axG2antt1.CountLockedColumns = 1; axG2antt1.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragScroll; axG2antt1.SingleSort = false; axG2antt1.ColumnsAllowSizing = true; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; axG2antt1.GridLineColor = Color.FromArgb(220,220,220); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Height = 15; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128)); var_Bar.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(204,204,0)); var_Bar.EndColor = var_Bar.StartColor; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,TaskB"; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternGradientVBox | EXG2ANTTLib.PatternEnum.exPatternBox; EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Copy("Task","TaskB"); var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128)); var_Bar1.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(153,153,0)); var_Bar1.EndColor = var_Bar1.StartColor; EXG2ANTTLib.Bar var_Bar2 = var_Chart.Bars["Summary"]; var_Bar2.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar2.OverlaidGroup = "Summary,SummaryB"; var_Bar2.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(204,204,0)); var_Bar2.StartColor = var_Bar2.Color; var_Bar2.EndColor = var_Bar2.Color; EXG2ANTTLib.Bar var_Bar3 = var_Chart.Bars.Copy("Summary","SummaryB"); var_Bar3.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(153,153,0)); var_Bar3.StartColor = var_Bar3.Color; var_Bar3.EndColor = var_Bar3.Color; axG2antt1.BackColorSortBar = axG2antt1.BackColor; axG2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Debug = true; axG2antt1.Columns[0].Data = -1; axG2antt1.Layout = "singlesort=\"C5:1\";multiplesort=\" C1:2\""; axG2antt1.EndUpdate(); |
1811 |
How can I filter for multiple captions on a single column, using OR clause
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; axG2antt1.ContinueColumnScroll = false; axG2antt1.MarkSearchColumn = true; axG2antt1.SearchColumnIndex = 1; axG2antt1.FilterBarPromptVisible = true; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Name") as EXG2ANTTLib.Column).Width = 96; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Title") as EXG2ANTTLib.Column); var_Column.Width = 96; var_Columns.Add("City"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h0 = var_Items.AddItem("Nancy Davolio"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Andrew Fuller"); var_Items.set_CellValue(h0,1,"Vice President, Sales"); var_Items.set_CellValue(h0,2,"Tacoma"); var_Items.set_SelectItem(h0,true); h0 = var_Items.AddItem("Janet Leverling"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Kirkland"); h0 = var_Items.AddItem("Margaret Peacock"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Redmond"); h0 = var_Items.AddItem("Steven Buchanan"); var_Items.set_CellValue(h0,1,"Sales Manager"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Michael Suyama"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Robert King"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Laura Callahan"); var_Items.set_CellValue(h0,1,"Inside Sales Coordinator"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Anne Dodsworth"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); axG2antt1.FilterBarPromptColumns = "1"; axG2antt1.FilterBarPromptPattern = "Vice Inside"; axG2antt1.FilterBarPromptType = EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAny; axG2antt1.EndUpdate(); |
1810 |
How can I filter for multiple captions on a single column, using AND clause
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; axG2antt1.ContinueColumnScroll = false; axG2antt1.MarkSearchColumn = true; axG2antt1.SearchColumnIndex = 1; axG2antt1.FilterBarPromptVisible = true; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Name") as EXG2ANTTLib.Column).Width = 96; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Title") as EXG2ANTTLib.Column); var_Column.Width = 96; var_Columns.Add("City"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h0 = var_Items.AddItem("Nancy Davolio"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Andrew Fuller"); var_Items.set_CellValue(h0,1,"Vice President, Sales"); var_Items.set_CellValue(h0,2,"Tacoma"); var_Items.set_SelectItem(h0,true); h0 = var_Items.AddItem("Janet Leverling"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Kirkland"); h0 = var_Items.AddItem("Margaret Peacock"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Redmond"); h0 = var_Items.AddItem("Steven Buchanan"); var_Items.set_CellValue(h0,1,"Sales Manager"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Michael Suyama"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Robert King"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Laura Callahan"); var_Items.set_CellValue(h0,1,"Inside Sales Coordinator"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Anne Dodsworth"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); axG2antt1.FilterBarPromptColumns = "1"; axG2antt1.FilterBarPromptPattern = "Vice Sales"; axG2antt1.FilterBarPromptType = EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAll; axG2antt1.EndUpdate(); |
1809 |
How can I display the limits/margins of the project, in the overview part of the control
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC" + "hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" + "JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" + "gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" + "FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" + "Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" + "5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" + "cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" + "xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" + "QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" + "SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" + "xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" + "fxEh1guAIAwQAgCAg"); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = (EXG2ANTTLib.OverviewVisibleEnum)0x400 | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.OverviewHeight = 64; var_Chart.OverviewSelBackColor = 0x1000000; var_Chart.OverviewBackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(250,250,250)); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1808 |
Is it possible to display a time-scale for the overview part of the control (separated)
axG2antt1.BeginUpdate(); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleSplit | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.OverviewHeight = 48; var_Chart.LevelCount = 2; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1807 |
Is it possible to display a time-scale for the overview part of the control
axG2antt1.BeginUpdate(); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.LevelCount = 2; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1806 |
How can I display the time-scale only, in the overview part of the control
axG2antt1.BeginUpdate(); axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScale | EXG2ANTTLib.OverviewVisibleEnum.exOverviewHideBars | EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.LevelCount = 2; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("2/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("2/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("3/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1805 |
How can I detect that the mouse pointer is within an InsideZoom object
// MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; Date d = var_Chart.get_DateFromPoint(-1,-1); Object iz = (var_Chart.InsideZooms.get_Contains(d) as Object); System.Diagnostics.Debug.Print( d.ToString() ); System.Diagnostics.Debug.Print( "If the iz object is nothing, the date is not zoomed, else it is." ); System.Diagnostics.Debug.Print( iz.ToString() ); } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.AllowInsideZoom = true; var_Chart.InsideZooms.Add(Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1804 |
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines
axG2antt1.BeginUpdate(); axG2antt1.ScrollBySingleLine = true; axG2antt1.ItemsAllowSizing = EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; axG2antt1.HeaderHeight = 28; axG2antt1.DefaultItemHeight = 24; axG2antt1.BackColorLevelHeader = axG2antt1.BackColor; axG2antt1.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Bump; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Copy("Task","TaskB"); var_Bar.Height = 15; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox; var_Bar.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(204,232,255)); var_Bar.EndColor = var_Bar.StartColor; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars["Task"]; var_Bar1.Height = -1; var_Bar1.Pattern = EXG2ANTTLib.PatternEnum.exPatternBox; var_Bar1.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(204,232,255)); var_Bar1.EndColor = var_Bar1.StartColor; var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Word-Wrap Inside"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1",null); var_Items.set_ItemBar(h,"A1",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]"); h = var_Items.AddItem("Word-Wrap Inside"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/19/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2",null); var_Items.set_ItemBar(h,"A2",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]"); h = var_Items.AddItem("Word-Wrap Back"); var_Items.AddBar(h,"TaskB",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A3",null); var_Items.set_ItemBar(h,"A3",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]"); var_Items.set_ItemBar(h,"A3",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtFlags,2); axG2antt1.EndUpdate(); |
1803 |
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = true; axG2antt1.ContinueColumnScroll = false; axG2antt1.MarkSearchColumn = false; axG2antt1.SearchColumnIndex = 1; axG2antt1.FilterBarHeight = 0; axG2antt1.FilterBarPromptVisible = true; axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("Name") as EXG2ANTTLib.Column).Width = 96; (var_Columns.Add("Title") as EXG2ANTTLib.Column).Width = 96; var_Columns.Add("City"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h0 = var_Items.AddItem("Nancy Davolio"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Andrew Fuller"); var_Items.set_CellValue(h0,1,"Vice President, Sales"); var_Items.set_CellValue(h0,2,"Tacoma"); var_Items.set_SelectItem(h0,true); h0 = var_Items.AddItem("Janet Leverling"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Kirkland"); h0 = var_Items.AddItem("Margaret Peacock"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"Redmond"); h0 = var_Items.AddItem("Steven Buchanan"); var_Items.set_CellValue(h0,1,"Sales Manager"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Michael Suyama"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Robert King"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); h0 = var_Items.AddItem("Laura Callahan"); var_Items.set_CellValue(h0,1,"Inside Sales Coordinator"); var_Items.set_CellValue(h0,2,"Seattle"); h0 = var_Items.AddItem("Anne Dodsworth"); var_Items.set_CellValue(h0,1,"Sales Representative"); var_Items.set_CellValue(h0,2,"London"); axG2antt1.FilterBarPromptPattern = "London"; axG2antt1.EndUpdate(); |
1802 |
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.SetParent(e.item,var_Items.get_FindItem(var_Items.get_CellValue(e.item,"ReportsTo"),"EmployeeID",null)); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1801 |
How can I highlight the limits/margins of a summary bar, according with the child bars
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoA" + "Q0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA="); var_Appearance.Add(2,"CP:1 -4 0 5 0"); var_Appearance.Add(3,"gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TN" + "CMTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIl" + "QjJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZ" + "OHYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQ" + "JZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA=="); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Summary"].Color = 0x3000000; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); var_Items.set_ItemBar(hSummary,"",EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor,33554432); axG2antt1.EndUpdate(); |